TypeScript 93.3%
JavaScript 4.4%
CSS 2.3%
1/**2 * Author: Simon-Pierre Boucher3 * Contact: contact@spboucher.ai4 * Project: Hilmacorp.ai — Web Platform5 * File: app/[locale]/privacy/page.tsx6 * Description: Privacy Policy page — data practices plus the cookie inventory and preferences access7 */89import type { Metadata } from "next";10import LegalPage from "@/components/LegalPage";11import ManageCookiesButton from "@/components/ManageCookiesButton";12import { getMessages, isLocale, type Locale } from "@/lib/i18n";1314export async function generateMetadata({15 params,16}: {17 params: Promise<{ locale: string }>;18}): Promise<Metadata> {19 const { locale } = await params;20 if (!isLocale(locale)) return {};21 const { meta } = getMessages(locale);22 return { title: { absolute: meta.privacy.title }, description: meta.privacy.description };23}2425export default async function PrivacyPage({26 params,27}: {28 params: Promise<{ locale: string }>;29}) {30 const { locale } = await params;31 const { privacy } = getMessages(locale as Locale);32 const cookies = privacy.cookiesSection;3334 return (35 <LegalPage36 title={privacy.title}37 lead={privacy.lead}38 lastUpdated={privacy.lastUpdated}39 sections={privacy.sections}40 >41 <section>42 <h2 className="font-display text-xl font-semibold text-ink">{cookies.title}</h2>43 <p className="mt-3 leading-relaxed text-ink-soft">{cookies.intro}</p>44 <div className="mt-6 overflow-x-auto rounded-2xl border border-line">45 <table className="w-full border-collapse bg-card text-left text-sm">46 <thead>47 <tr className="border-b border-line bg-paper-2">48 <th scope="col" className="px-5 py-3 font-semibold text-ink">49 {cookies.tableName}50 </th>51 <th scope="col" className="px-5 py-3 font-semibold text-ink">52 {cookies.tablePurpose}53 </th>54 <th scope="col" className="px-5 py-3 font-semibold text-ink">55 {cookies.tableDuration}56 </th>57 </tr>58 </thead>59 <tbody>60 {cookies.rows.map((row) => (61 <tr key={row.name} className="border-b border-line last:border-b-0">62 <td className="px-5 py-3 font-mono text-xs text-ink">{row.name}</td>63 <td className="px-5 py-3 text-ink-soft">{row.purpose}</td>64 <td className="px-5 py-3 text-ink-soft">{row.duration}</td>65 </tr>66 ))}67 </tbody>68 </table>69 </div>70 <ManageCookiesButton71 label={cookies.manage}72 className="mt-6 rounded-full border border-line-strong px-6 py-2.5 text-sm font-medium text-ink transition-colors hover:border-accent hover:text-accent"73 />74 </section>75 </LegalPage>76 );77}78